#include "drivers.h"
#include "rtos.h"
#include "tasks.h"

/**
 * @brief  Light on the Blue LED for 100ms and turn off for 
 *  	   800ms
 *
 * @param   NULL
 * @return  none
 * 
 */
void Task_BlueLED(void *pvParameters)
{
	portTickType OnTime=100/portTICK_RATE_MS;
	portTickType OffTime=800/portTICK_RATE_MS;

	while(1)
	{
		LED1_On();
		vTaskDelay(OnTime);
		LED1_Off();
		vTaskDelay(OffTime);
	}
	uprintf("Blue LED Task Error,Suicide!\r\n");
	vTaskDelete(NULL);
}

/**
 * @brief  Light on the Green LED for 100ms and turn off for 
 *  	   800ms
 *
 * @param   NULL
 * @return  none
 * 
 */
void Task_GreenLED(void *pvParameters)
{
		portTickType OnTime=100/portTICK_RATE_MS;
	portTickType OffTime=800/portTICK_RATE_MS;

	while(1)
	{
		LED2_On();
		vTaskDelay(OnTime);
		LED2_Off();
		vTaskDelay(OffTime);
	}
	uprintf("Green LED Task Error,Suicide!\r\n");
	vTaskDelete(NULL);
}
